#include "junix.h"
using namespace std;

int main(int argc, char **argv)
{
	srand(time(0));
	vector<int> vi(20);
	generate(vi.begin(),vi.end(),
			boost::bind(modulus<int>(),rand(),15));
	copy(vi.begin(),vi.end(),
			ostream_iterator<int>(cout," "));
	std::cout<<endl;

	//OK
	generate(vi.begin(),vi.end(),
			boost::bind(modulus<int>(),
				boost::bind(rand), 15));
	copy(vi.begin(),vi.end(),
			ostream_iterator<int>(cout," "));
	std::cout<<endl;
}
